package it.koutifaris.travianmap.view.commandlistview;

import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ListView;

public class ListViewOnLongClickListener implements OnItemLongClickListener {

	@Override
	public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
		ListView listView = (ListView) parent;
		ListElement item = (ListElement) listView.getItemAtPosition(position);
		item.getLongClickCommand().execute();

		return true;
	}

}
